<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <title>风控统计</title>
    <link rel="icon" href="favicon.ico" type="image/x-icon"/>
    <!-- 当前页面样式 -->
    <link rel="stylesheet" href="<s:url value="/css/common.css"/>"/>
    <!-- 当前页面样式 END -->
    <script type="text/javascript" src="<c:url value="/js/jquery-1.3.2.js" />"></script>
	<script type="text/javascript" src="<c:url value="/js/common.js" />"></script>
	<script type="text/javascript" src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>
    <script type="text/javascript">
    $(function(){
    	
    })
    
    function modifyHeadRoute(insCdPre,procCd,routeInsCd){
			window.location.href="<%=basePath%>/windControllSta/findHeadRouteDetail.ct?tblMgmInsCashHeadRoute.insCdPre="+insCdPre+"&tblMgmInsCashHeadRoute.procCd="+procCd+"&tblMgmInsCashHeadRoute.routeInsCd="+routeInsCd;
		}
    
    function querySubmit(){
    	$("#queryForm").attr("action","<%=basePath%>/windControllSta/queryHeadRoute.ct");
    	$("#queryForm").submit();
    }
		
	</script>
</head>
<body>
<s:form id="queryForm" action="" method="post" theme="simple">
<table class="tb">
    <tbody>
        <tr class="tb-line">
            <td class="tb-td" colspan="4"><div class="tb-h2">POS收单运营管理平台</div></td>
        </tr>
		<tr class="tb-line">
            <td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">接入机构号：</div>
            </td>
            <td class="tb-td">
                <label class="tb-select">
                    <s:textfield name="tblMgmInsCashHeadRoute.insCdPre" cssClass="queryWidth" />
                </label>
            </td>
            <td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">交易类型：</div>
            </td>
            <td class="tb-td">
                <label class="tb-select">
                    <s:select name="tblMgmInsCashHeadRoute.procCd" cssClass="queryWidth" list="#{'1171':'D0代付','2100':'单笔实时代付'}" headerKey="" headerValue="--请选择--"></s:select>
                </label>
            </td>
         </tr>
         <tr class="tb-line">
            <td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">代付通道：</div>
            </td>
            <td class="tb-td">
                <label class="tb-select">
                    <s:select name="tblMgmInsCashHeadRoute.routeInsCd" list="#{'0':'未知通道','1':'银联多渠道代付','2':'银嘉代付'}" headerKey="" headerValue="--请选择--"></s:select>
                </label>
            </td>
            
         </tr>
        <tr class="tb-line">
            <td class="tb-td line-submit" align="right" colspan="4">
                <label class="tb-input-submit">
                    <input onclick="querySubmit()" type="button" value="查   询"/>
                </label>
            </td>
        </tr>
    </tbody>
    
</table>

<div class="big-tb">
    <table class="tb" style="width: 100%;">
        <thead>
            <tr class="tb-line">
                <th class="tb-th" colspan="13">头寸信息查询</th>
            </tr>
            <tr class="tb-line bg-gray">
                		<th class="tb-th">序号</th>
                		<th class="tb-th">接入机构号</th>
						<th class="tb-th">接入机构名</th>
						<th class="tb-th">交易类型</th>
						<th class="tb-th">代付通道</th>
						<th class="tb-th">代付通道默认头寸(元)</th>
						<th class="tb-th">代付通道剩余可用头寸(元)</th>
						<th class="tb-th">代付通道最小代付金额(元)</th>
						<th class="tb-th">代付通道最大代付金额(元)</th>
						<th class="tb-th">代付通道起始生效时间</th>
						<th class="tb-th">代付通道终止生效时间</th>
						<th class="tb-th">操作</th>
            </tr>
        </thead>
        <tbody>
			<s:iterator value="#request.routeList" status="stat" id="tft">
							<tr  class="tb-line"  >
							<td class="tb-td">
							<s:property value="#stat.count"/>
							</td>
							<td class="tb-td">
							<s:property value="#tft.insCdPre"/>
							</td>
					        <td class="tb-td">
							<s:property value="#tft.insName"/>
							</td>
							<td class="tb-td">
							<s:property value="#tft.procName"/>
							</td>
							<td class="tb-td">
							<s:property value="#tft.routeName"/>
							</td>
							<td class="tb-td">
							 <s:property value="#tft.defaultHead"/>
							</td>
							<td class="tb-td">
							 <s:property value="#tft.avaliableHead"/>
							</td>
							<td class="tb-td">
							<s:property value="#tft.resver1"/>
							</td>
							<td class="tb-td">
							<s:property value="#tft.resver2"/>
							</td>
							<td class="tb-td">
							<s:property value="#tft.resver3"/>
							</td>
							<td class="tb-td">
							<s:property value="#tft.resver4"/>
							</td>
							<td class="tb-td">
							<input type="button" value="修改" onclick="modifyHeadRoute('${tft.insCdPre}','${tft.procCd }','${tft.routeInsCd }')"/>
							</td>
						    </tr>
						</s:iterator>
        </tbody>
    </table>
</div>
</s:form>

<s:if test="#request.msg !=null">
		<script language="javascript">
			alert("${request.msg}");
		</script>
	</s:if>
</body>
</html>